<template>
  <div class="technical">
    <div class="left">
      <div class="left-top van-multi-ellipsis--l2">
        {{ info.title }}
      </div>
      <div class="left-bottom">
        <div class="b1">{{ info.created_at | formatTime }}</div>
        <i class="b2 iconfont">&#xe644;</i>
        <div class="b3">{{ info.read }}</div>
        <i class="b4 iconfont">&#xe639;</i>
        <div class="b5">{{ info.star }}</div>
      </div>
    </div>
    <img v-if="info.cover" :src="baseURL + info.cover" alt="" class="right" />
  </div>
</template>
<script>
// import moment from 'moment'
export default {
  props: ['info'],
  // filters: {
  //   formatTime (str) {
  //     console.log('111111111111111111111111')

  //     console.log(this)
  //     console.log('1222222222222222222')

  //     const _local = moment(str)
  //     const now = moment()
  //     const _diff = now.diff(_local, 'h')
  //     if (_diff < 1) {
  //       return '刚刚'
  //     } else if (_diff < 3500) {
  //       return _diff + '小时前'
  //     } else {
  //       return moment(str).format('YYYY/MM/DD HH:mm:ss')
  //     }
  //   }
  // },
  data () {
    return {
      baseURL: process.env.VUE_APP_URL
    }
  }
}
</script>
<style lang="less" scoped>
.technical {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  .left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .left-top {
      font-size: 16px;
      font-family: PingFangSC, PingFangSC-Medium;
      font-weight: 500;
      text-align: left;
      color: #181a39;
      line-height: 23px;
      letter-spacing: 0px;
    }
    .left-bottom {
      display: flex;
      align-items: center;
      .b1 {
        flex: 1;
        font-size: 12px;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        text-align: left;
        color: #b4b4bd;
        line-height: 17px;
        letter-spacing: 0px;
      }
      .b2 {
        font-size: 16px;
      }
      .b3 {
        font-size: 12px;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;

        color: #b4b4bd;
        line-height: 17px;
        letter-spacing: 0px;
      }
      .b4 {
        font-size: 16px;
      }
      .b5 {
        font-size: 12px;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;

        color: #b4b4bd;
        line-height: 17px;
        letter-spacing: 0px;
      }
    }
  }
  .right {
    width: 113px;
    height: 75px;
    object-fit: cover;
    padding-left: 10px;
  }
}
</style>
